'''
Author: Wujie Duan wjduan@linx-info.com
Date: 2024-01-31 13:11:17
LastEditors: Wujie Duan wjduan@linx-info.com
LastEditTime: 2024-02-07 17:21:23
FilePath: /src/conf.py
Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
'''
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = '理解内核配置项'
copyright = '2024, duanwujie'
author = 'duanwujie'
release = '0.1.0'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
     #'myst_parser',

extensions = [
     'recommonmark',
     'sphinx_markdown_tables',
     'sphinx.ext.mathjax',
]

templates_path = ['_templates']
exclude_patterns = []

language = 'zh_CN'

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']

master_doc = 'index'
# -- Options for latex output
# latex_toplevel_sectioning = 'part' #使用Part
latex_documents = [
    (master_doc,'understand-kconfig.tex','理解内核配置项','duanwujie','manual')
]
latex_elements = {
    'papersize': 'letterpaper',
    'sphinxsetup': 'verbatimwithframe=false, VerbatimColor={gray}{0.95}',
    'classoptions' : 'openany,oneside',
    # 'extraclassoptions': 'landscape',
    #parindent 设置首行缩进
    #parskip 设置段落间距
    #\\\\usepackage{indentfirst}
    #\\\\setlength{\\\\parindent}{2em}  


    # 'preamble': r'''
    # \usepackage{titlesec}
    # \titleformat{\chapter}[display]   
    #     {\normalfont\bfseries}{}{0pt}{\Huge}  % 章节标题保持原始大小写
    # \titleformat{\section}
    #     {\normalfont\bfseries}{}{0pt}{\Large}  % 可选：保持节标题大小写
    # ''',
    'fncychap' : '''
    \\usepackage{fncychap}

 
    \\ChNameVar{\\centering\\Huge\\rm}
    \\ChNumVar{\\Huge\\rm}
    \\settowidth{\\px}{\\CNV\\thechapter}
    \\ChTitleVar{\\centering\\Huge\\rm}
    \\ChRuleWidth{1pt}

    \\renewcommand{\\DOCH}{\\CNV\\FmN \\thechapter}

    ''',
    'preamble' : '''

    \\setlength{\\parskip}{1.5em}  






    '''

    
}
